/*    */ package eos.moe.dragoncore;
/*    */ import io.netty.buffer.ByteBuf;
/*    */ import io.netty.buffer.ByteBufInputStream;
/*    */ import io.netty.handler.codec.EncoderException;
/*    */ import java.io.DataInput;
/*    */ import java.io.DataInputStream;
/*    */ import java.io.DataOutput;
/*    */ import java.io.IOException;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ import net.minecraft.nbt.CompressedStreamTools;
/*    */ import net.minecraft.nbt.NBTBase;
/*    */ import net.minecraft.nbt.NBTTagCompound;
/*    */ import net.minecraft.nbt.NBTTagList;
/*    */ import net.minecraftforge.fml.relauncher.ReflectionHelper;
/*    */ 
/*    */ public class ur {
/*    */   public static NBTTagCompound v(DataInputStream a) throws IOException {
/* 19 */     return CompressedStreamTools.func_74794_a(a);
/*    */   }
/*    */   
/*    */   public static void v(NBTTagCompound a, DataOutput dataOutput) throws IOException {
/* 23 */     CompressedStreamTools.func_74800_a(a, dataOutput);
/*    */   }
/*    */   
/*    */   public static Map<String, NBTBase> v(NBTTagCompound a) {
/* 27 */     return (Map<String, NBTBase>)ReflectionHelper.getPrivateValue(NBTTagCompound.class, a, 2);
/*    */   }
/*    */   
/*    */   public static NBTBase v(NBTTagList a, int i) {
/* 31 */     List<NBTBase> list = (List)ReflectionHelper.getPrivateValue(NBTTagList.class, a, 1);
/* 32 */     return list.get(i);
/*    */   }
/*    */   
/*    */   public static void v(NBTTagCompound a, ByteBuf byteBuf) {
/* 36 */     if (a == null) {
/* 37 */       byteBuf.writeByte(0);
/*    */     } else {
/*    */       try {
/* 40 */         CompressedStreamTools.func_74800_a(a, (DataOutput)new ByteBufOutputStream(byteBuf));
/* 41 */       } catch (IOException iOException) {
/* 42 */         throw new EncoderException(iOException);
/*    */       } 
/*    */     } 
/*    */   }
/*    */   
/*    */   public static NBTTagCompound v(ByteBuf a) {
/* 48 */     int i = a.readerIndex();
/* 49 */     byte b = a.readByte();
/*    */     
/* 51 */     if (b == 0) {
/* 52 */       return null;
/*    */     }
/*    */     
/* 55 */     a.readerIndex(i);
/*    */     try {
/* 57 */       return CompressedStreamTools.func_152456_a((DataInput)new ByteBufInputStream(a), new NBTSizeTracker(2097152L));
/* 58 */     } catch (IOException iOException) {
/* 59 */       throw new EncoderException(iOException);
/*    */     } 
/*    */   }
/*    */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncor\\ur.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */